//
//  main.m
//  FirstClass
//
//  Created by mac on 16-4-5.
//  Copyright (c) 2016年 liuchengming. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Atom.h"
#import "Animal.h"
#import "Person.h"
#import "Mouse.h"
int main(int argc, const char * argv[])
{

    @autoreleasepool {
        
        // insert code here...
        NSLog(@"Hello, World!");
        Atom * atom = [[Atom alloc] init];
        NSLog(@"Atom chemical element name:%@",atom.chemicalElement);
        
        Person  *p = [[Person alloc]init];
        p.name =@"张三";
        
        Mouse * mouse =[[Mouse alloc]init];
        mouse.name = @"老鼠";
        
        NSArray * arr = @[p,mouse];
        for (int i=0; i<arr.count; i++)
        {
            Animal *ani =arr[i];
            [ani eat];
            [ani sleep];
        }
        
        [mouse makeRole];
        
    }
    return 0;
}

